<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>订单详情</title>
		<link rel="stylesheet" href="css/_all-skins.min.css" />
		<link rel="stylesheet" href="css/AdminLTE.min.css" />
		<link rel="stylesheet" href="css/bootstrap.min.css" />
		<link rel="stylesheet" href="css/font-awesome.min.css" />
		<link rel="stylesheet" type="text/css" href="css/layer.css"/>
	</head>
	<style>
		.table_base_title{
			background: #666666;
			color: white;
			width:70px;
		}
		.base_infor{
			height: 120px;
			font-size: 12px;
			background: white;
			margin-top: 20px;
			text-align: center;
		}
		.base_infor1{
			height: 30px;
			background: #999999;
		}
		.product_num{
			height: 150px;
			margin-top: 20px;
			font-size: 12px;
			text-align: center;
			background: white;
		}
		.product_num td{
			border: solid 1px #C7C7C7;
		}
		.pic_infor{
			height: 170px;
			font-size: 12px;
			margin-top: 20px;
			text-align: center;
			background: white;
		}
		.receiver{
			height: 70px;
			margin-top: 20px;
			background: white;
		}
		.receiver td{
			text-align: center;
			font-size: 12px;
			border: solid 1px #C7C7C7;
		}
		.order_status{
			height: 100px;
			width: 100%;
		}
		.order_status div{
			display: inline-block;
			
			height: 85px;
			width: 20%;
			float: left;
			text-align: center;
			font-size: 12px;
			position: relative;
		}
		.order_active{
			color: green;
		}
		.order_status i{
			font-size: 30px;
			margin-bottom: 5px;
		}
		.order_status label{
			color: dimgray;
			margin-top: 10px;
		}
		.order_status .fa-long-arrow-right{
			position: absolute;
			top: 20px;
			right: 10px;
		}
		.change_adr{
			background: #3c8dbc;
			color: white;
			border: none;
			padding: 5px;
			border-radius:4px 4px;
			font-size: 12px;
		}
		.change_btn span{
			display: inline-block;
			
			width: 70px;
			text-align: center;
			font-weight: bold;
		}
		table{
			min-width: 800px!important;
		}
		.table_data4 td{
			padding-top: 5px;
			padding-bottom: 5px;
			border: solid 1px #C7C7C7;
		}
		.table_data5{
			text-align: center;
			line-height: 40px;
		}
	</style>
	<body class="hold-transition skin-blue sidebar-mini fixed">
<div class="wrapper">

   <header class="main-header">
    <!-- Logo -->
    <a href="index2.html" class="logo">
      <!-- mini logo for sidebar mini 50x50 pixels -->
   
      <!-- logo for regular state and mobile devices -->
      <span class="logo-lg"><b>衣当先</b>CRM</span>
    </a>
    <!-- Header Navbar: style can be found in header.less -->
    <nav class="navbar navbar-static-top">
      <!-- Sidebar toggle button-->
      <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
        <span class="sr-only">Toggle navigation</span>
      </a>

      <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">
          <li class="dropdown user user-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
            	
              <img src="img/user2-160x160.jpg" class="user-image" alt="User Image">
              <span class="hidden-xs  manger-name">Amy</span>
               
            	 <span class="change_password" style="font-size: 12px;margin-left: 40px;">修改密码</span>
            	 <span class="exit_login" style="font-size: 12px;">退出登录</span>
            </a>
            
          </li>
        </ul>
      </div>
    </nav>
  </header>
  <!-- Left side column. contains the logo and sidebar -->
  <aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
      <!-- Sidebar user panel -->
      <div class="user-panel">
        <div class="pull-left image">
          <img src="img/user2-160x160.jpg" class="img-circle">
        </div>
        <div class="pull-left info">
          <p class="manger-name">Amy</p>
          <a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
        </div>
      </div>
      <!-- search form -->
      <form action="#" method="get" class="sidebar-form">
        <div class="input-group">
          <input type="text" name="q" class="form-control" placeholder="Search...">
          <span class="input-group-btn">
                <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
                </button>
              </span>
        </div>
      </form>
      <!-- /.search form -->
      <!-- sidebar menu: : style can be found in sidebar.less -->
      <ul class="sidebar-menu" data-widget="tree">
        <li class="header">功能目录</li>
        
        <li class=" treeview">
          <a href="#">
            <i class="fa fa-dashboard"></i> <span>系统首页</span>
            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
          </a>
          <ul class="treeview-menu">
            <li><a href="index.html"><i class="fa fa-circle-o"></i> 首页总览</a></li>
            <li><a href="login_log.html"><i class="fa fa-circle-o"></i> 登录日志</a></li>
              <li><a href="id_manager.html"><i class="fa fa-circle-o"></i> 账号管理</a></li>
          </ul>
        </li>
      
        <li class="treeview">
          <a href="#">
            <i class="fa fa-laptop"></i>
            <span>商品管理</span>
            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
          </a>
           <ul class="treeview-menu">
            <li><a href="product_list.html"><i class="fa fa-circle-o"></i> 商品列表</a></li>
            <li><a href="new_product.html"><i class="fa fa-circle-o"></i> 新增商品</a></li>
            <li><a href="product_kind.html"><i class="fa fa-circle-o"></i> 商品分类</a></li>
            <li><a href="product_confirm.html"><i class="fa fa-circle-o"></i> 商品审核</a></li>
             <li><a href="product_income.html"><i class="fa fa-circle-o"></i> 商品回收</a></li>
          </ul>
        </li>

        <li class="active treeview">
          <a href="#">
            <i class="fa fa-edit"></i> <span>订单管理</span>
            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
          </a>
          <ul class="treeview-menu">
            <li><a href="hire_order.html"><i class="fa fa-circle-o"></i> 租赁订单</a></li>
            <li><a href="pay_order.html"><i class="fa fa-circle-o"></i> 支付订单</a></li>
            <li><a href="operate_log.html"><i class="fa fa-circle-o"></i> 订单日志</a></li>
          </ul>
        </li>          
        <li class="treeview">
          <a href="#">
            <i class="fa fa-pie-chart"></i>
            <span>用户管理</span>
            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
          </a>
          <ul class="treeview-menu">
            <li><a href="user_list.html"><i class="fa fa-circle-o"></i> 用户列表</a></li>
            <li><a href="discounts.html"><i class="fa fa-circle-o"></i> 优惠卷中心</a></li>
          </ul>
        </li>
        <li class="treeview">
          <a href="#">
            <i class="fa fa-pie-chart"></i>
            <span>数据管理</span>
            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
          </a>
          <ul class="treeview-menu">
            <li><a href="all_data.html"><i class="fa fa-circle-o"></i> 数据日报</a></li>
            <li><a href="product_data.html"><i class="fa fa-circle-o"></i> 商品数据</a></li>
            <li><a href="order_data.html"><i class="fa fa-circle-o"></i> 订单数据</a></li>
            <li><a href="user_data.html"><i class="fa fa-circle-o"></i> 用户数据</a></li>
           <li><a href="income_data.html"><i class="fa fa-circle-o"></i> 收入数据</a></li>
          </ul>
        </li>  
       <li>
          <a href="advice.html">
            <i class="fa fa-files-o"></i> <span>反馈建议</span>
          </a>
        </li>
         <li>
          <a href="w_internet.html">
            <i class="fa fa-book"></i> <span>物联网订单</span>
          </a>
        </li>
      </ul>
    </section>
    <!-- /.sidebar -->
  </aside>

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    

    <!-- Main content -->
           
    
    <section class="content" >
       <div class="row">
       	 <div class="col-lg-1"></div>
       	 <div class="col-lg-10">
       	 	
       	 	<div class="order_status">
       	 			<div>
       	 				<i class="fa fa-file-text"></i><br />
       	 				<span>发起订单</span><br />
       	 				<label class="order-time"></label>
       	 				<i class="fa fa-long-arrow-right"></i>
       	 			</div>
       	 			
       	 			<div>
       	 				<i class="fa fa-file-text"></i><br />
       	 				<span>打包发货</span><br />
       	 				<label  class="order-time"></label>
       	 				<i class="fa fa-long-arrow-right"></i>
       	 			</div>
       	 			
       	 			<div>
       	 				<i class="fa fa-file-text"></i><br />
       	 				<span>签收订单</span><br />
       	 				<label class="order-time"></label>
       	 				<i class="fa fa-long-arrow-right"></i>
       	 			</div>
       	 			
       	 			<div>
       	 				<i class="fa fa-file-text"></i><br />
       	 				<span>归还订单</span><br />
       	 				<label class="order-time"></label>
       	 				<i class="fa fa-long-arrow-right"></i>
       	 			</div>
       	 		
       	 			<div>
       	 				<i class="fa fa-file-text"></i><br />
       	 				<span>订单完成</span><br />
       	 				<label class="order-time"></label>
       	 			</div>
       	 	</div>
       	 	<div class="change_btn">
       	 		<span>消息变更：</span>
       	 		<button class="change_adr">变更收货人信息</button>
       	 	</div>
       	 	<table class= " col-lg-12 product_num">
       	 		<tbody>
       	 	     <tr class="base_infor1">
       	 	     	<td rowspan="4" class="table_base_title">基本信息</td>
       	 	     	<td>订单编号</td>
       	 	     	<td>用户手机号</td>
       	 	     	<td>订单商品</td>
       	 	     	<td>订单数量</td>
       	 	     	<td>下单时间</td>
       	 	     </tr>
       	 	     <tr class="table_data1">
       	 	     </tr>
       	 	     <tr  class="base_infor1">
       	 	     	<td>订单状态</td>
       	 	     	<td>发货单号</td>
       	 	     	<td>配送物流</td>
       	 	     	<td>归还单号</td>
       	 	     	<td>归还物流</td>
       	 	     </tr>
       	 	      <tr  class="table_data2">
       	 	     </tr>
       	 		</tbody>
       	 	</table>
       	 	<table class="col-lg-12 receiver" >
       	 	
       	 		<tbody>
       	 			<tr class="base_infor1">
       	 				<td rowspan="2" class="table_base_title">收货人信息</td>
	       	 			<td>姓名</td>
	       	 			<td>手机号</td>
	       	 			<td>邮编</td>
	       	 			<td>收货地址</td>
       	 			</tr>
       	 			<tr class="table_data3">
       	 			</tr>
       	 		</tbody>
       	 	</table>
       	 	<table class="col-lg-12 base_infor">
       	 	
       	 		<tbody>
       	 			<tr class="base_infor1">
       	 				<td rowspan="2" class="table_base_title table_data4-num">商品信息</td>
	       	 			<td>商品编号</td>
	       	 			<td>商品名</td>
	       	 			<td>商品尺码</td>
	       	 			<td>商品图</td>
	       	 			<td>下单时间</td>
       	 			</tr>
       	 			<tr class="table_data4"></tr>
       	 		</tbody>
       	 	</table>
			<table class="col-lg-12 receiver" >
       	 	
       	 		<tbody>
       	 			<tr class="base_infor1">
       	 				<td rowspan="2" class="table_base_title">配饰选择</td>
	       	 			<td>备注</td>
       	 			</tr>
       	 			<tr class="table_data5">
       	 			</tr>
       	 		</tbody>
       	 	</table>
       	 </div>
       </div>

     
    </section>
    <!-- /.content -->
  </div>
   
  <!-- /.content-wrapper -->
  <footer class="main-footer">
    <div class="pull-right hidden-xs">
      <b>Version</b> 2.0.0
    </div>
    <strong>Copyright &copy; 2017-2018 西安寒武纪信息科技有限公司.</strong> All rights
    reserved.
  </footer>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/adminlte.min.js"></script>
<script type="text/javascript" src="js/moment.min.js" ></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/layer.js"></script>
<script src="js/jq.cookie.js"></script>
<script>
function GetQueryString(name)
{
     var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
     var r = window.location.search.substr(1).match(reg);
     if(r!=null)return  unescape(r[2]); return null;
}
		var orderNum = GetQueryString('num');	
		$.ajax({
			type:"get",
			url:"https://www.retux.cn/MgOrderDetail",
			async:true,
			data:{
				Id:orderNum
			},
			success:function(data){
				
				dataView(data);
			}
		});	
		
		function dataView(data){
				for (var i =0;i<data[0][0].length;i++) {
					$('.order-time').eq(i).text(data[0][0][i])
					
				}
				if(data[0][1]=='待发货'){
					$('.order_status').find('div').eq(0).addClass('order_active');
					
				}else if(data[0][1]=='已发货'){
					$('.order_status').find('div').eq(0).addClass('order_active');
					$('.order_status').find('div').eq(1).addClass('order_active');
					
				}else if(data[0][1]=='待归还'){
					$('.order_status').find('div').eq(0).addClass('order_active');
					$('.order_status').find('div').eq(1).addClass('order_active');
					$('.order_status').find('div').eq(2).addClass('order_active');
					
				}else if(data[0][1]=='已归还'){
					for (var i=0;i<4;i++) {
						$('.order_status').find('div').eq(i).addClass('order_active');
					}
				}else{
					for (var i=0;i<5;i++) {
						$('.order_status').find('div').eq(i).addClass('order_active');
					}
				}
				
				var tableData1 = `
						<td>${data[1][0]}</td>
	       	 	     	<td>${data[1][1]}</td>
	       	 	     	<td>${data[1][2]}</td>
	       	 	     	<td>${data[1][3]}</td>
	       	 	     	<td>${data[1][4]}</td>
				`;
       	 	    $('.table_data1').append(tableData1);
       	 	    
       	 	    //
       	 	    var tableData2 = `
						<td>${data[1][5]}</td>
	       	 	     	<td>${data[1][6]}</td>
	       	 	     	<td>${data[1][7]}</td>
	       	 	     	<td>${data[1][8]}</td>
	       	 	     	<td>${data[1][9]}</td>
				`;
       	 	    $('.table_data2').append(tableData2);
				///
				var tableData3 = `
						<td>${data[2][0]}</td>
	       	 	     	<td>${data[2][1]}</td>
	       	 	     	<td>${data[2][2]}</td>
	       	 	     	<td>${data[2][3]}</td>
				`;
       	 	    $('.table_data3').append(tableData3);
				///
				$('.table_data4-num').attr('rowspan',data[3].length+1)
				for (var i=0;i<data[3].length;i++) {
					var tableData4 = `
					
					    	<td>${data[3][i][0]}</td>
		       	 			<td>${data[3][i][1]}</td>
		       	 			<td>
		       	 				${data[3][i][2]}
		       	 			</td>
		       	 			<td>
		       	 				<img src="${data[3][i][3]}" height="70px" width="70px"/>
		       	 			</td>
		       	 			<td>${data[3][i][4]}</td>
		       	 		
	       	 		`;
	       	 		$('.table_data4').append(tableData4);
	       	 		
				}
				$('.table_data5').append(data[4]);
				$('.change_adr').click(function(){
					if(data[0][1]=='待发货'){
						layer.open({
							type: 2,
							title:false,
							closeBtn: 1,
							area: ['360px', '300px'],
							shade: 0.8,
							shadeClose:true,
							anim:1,
							id: 'LAY_layuipro',
							btnAlign: 'c',
							moveType: 1,
							content: 'http://119.23.212.200:30000/edit_infor.html?num='+data[1][0],
							success: function() {
					
							}
					
						})
						
						
					}else{
						layer.msg('只有发起订单时才能修改');
					}
				})
		}
		
		
</script>
</body>
</html>
